const {ccclass, property} = cc._decorator;
import LevelLogic from "../../scripts/logic/LevelLogic"

@ccclass
export default class PassAllLevels extends cc.Component {

    start () {
        if(LevelLogic.getCurrentPlayLevel() == 2) {
            let clickTimes = 0
            this.node.on(cc.Node.EventType.TOUCH_END, ()=>{
                clickTimes = clickTimes + 1
                console.log("IAD pass all time:", clickTimes)
                if(clickTimes >= 10) {
                    window['allpass'] && window['allpass']()
                }
            }, this)
        }
    }

    // update (dt) {}
}
